include ../Makefile.inc

SUB_MODULES = 
SUB_HEADERS =

all : $(BIN_DIR)/tcp_latency

$(BIN_DIR)/tcp_latency : $(OBJ_DIR)/main.o $(SUB_MODULES)
	$(CXX) $^ $(LIBS) -o $@

$(OBJ_DIR)/main.o : main.cpp $(SUB_HEADERS) $(TOOLS_LIB_FILE)
	-mkdir -p $(OBJ_DIR)
	$(CXX) $(INCLUDES) $< -c -o $@

$(OBJ_DIR)/%.o : %.cpp %.h $(TOOLS_LIB_FILE)
	-mkdir -p $(OBJ_DIR)
	$(CXX) $(INCLUDES) $< -c -o $@

$(TOOLS_LIB_FILE) : force_look
	cd ..; $(MAKE) lib

clean:
	rm -f $(OBJ_DIR)/*
	rm -f $(BIN_DIR)/tcp_latency

force_look:
	true
